// components/custom-tabBar/ctabBar.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    isShow_index:true,
    isShow_play:false,
    isShow_my:false,
    selected: 0, //首页
    color: "#8D8D8D",
    selectedColor: "#C62F2F",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/iconfont/music.png",
      selectedIconPath: "/iconfont/selected-music.png",
      text: "乐库"
    }, {
      pagePath: "/pages/player/player",
      iconPath: "/iconfont/selected-playing.png",
      selectedIconPath: "/iconfont/playing.png",
      text: ""
    },
      {
        pagePath: "/pages/my/my",
        iconPath: "/iconfont/me.png",
        selectedIconPath: "/iconfont/selected-me.png",
        text: "我的"
      }]
  },

  /**
   * 组件的方法列表
   */
   
  methods: {
    switchTab_index(e){
      console.log(e);
      wx.switchTab({
        url: '/pages/index/index',
      })
      this.setData(
        {
          isShow_index:true,
          isShow_play:false,
          isShow_my:false,
        }
      )
    },

    switchTab_player(){
      wx.switchTab({
        url: '/pages/player/player',
      })
      this.setData(
        {
          isShow_play:true,
          isShow_index:false,
          isShow_my:false,
        }
      )
    },
    switchTab_my(){
      wx.switchTab({
        url: '/pages/my/my',
      })
      this.setData(
        {
          isShow_my:true,
          isShow_play:false,
          isShow_index:false,
        }
      )
    },
   


  }
 
})
